package com.my.product.controller;

import com.my.product.bean.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author YangYunbo
 * @version 2021-07-08
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {


    @GetMapping("/get")
    public User get() {
        log.info("UserController.get() start.........");
        User user = User.builder()
                .id(1)
                .name("Tom")
                .age(10)
                .email("Tom@qq.com")
                .build();
        log.info("UserController.get() end.........");
        return user;
    }

}
